#include <iostream>
using namespace std;;
int main()
{char name[100][30];
 int n;int m=1;
 while(cin>>n)
 {if (n==0)  break;
  for(int i=1;i<=n;i++)
     cin>>name[i];
  cout<<"SET"<<" "<<m<<endl;
  for(int j=1;j<=n;j=j+2)
     cout<<name[j]<<endl;
  for(int h=((n%2)==1?n-1:n);h>=2;h=h-2)
     cout<<name[h]<<endl;
  m=m+1;
     }
 system("pause");
 return 0;
}
  
